package clases;

import java.awt.Graphics;
import java.awt.Image;

public class Sprite {
		private Image image;
		
		public Sprite(Image image) {
			this.image = image;
		}
		
		public int getWidth() {
			return image.getWidth(null);
		}

		public int getHeight() {
			return image.getHeight(null);
		}
		
		/**
		 * Draw the sprite onto the graphics context provided
		 * 
		 * @param g The graphics context on which to draw the sprite
		 * @param x The x location at which to draw the sprite
		 * @param y The y location at which to draw the sprite
		 */
		public void draw(Graphics g,int x,int y) {
			g.drawImage(image,x,y,null);
		}
	}